<?php

$__FILEPATH__ = dirname(__FILE__)."/";
require_once($__FILEPATH__."func_common.php");
require_once($__FILEPATH__."class_def.php");
require_once($__FILEPATH__."conf/info.php");

if(isset($_GET["id"]))
	$id = intval($_GET["id"]);
else 
	header("Location: ./newslist.php");

$Object = new NewsListItem();
$mysqli = GetMysqliInstance();
$result = $mysqli->query("select * from newslist where id=$id");
if ($result)
{
	if ($row = $result->fetch_array(MYSQLI_ASSOC))
	{
		$Object->id = $row["id"];
		$Object->title = $row["title"];
		$Object->content = $row["content"];
		$Object->user = $row["user"];
		$Object->ip = $row["ip"];
		$Object->time = $row["time"];
	}
	$result->close();
}

$mysqli->close();

?>